package com.fqg.weblucene.web;

import cn.hutool.http.HttpUtil;
import com.fqg.weblucene.lucene.utils.ConfigUtils;

/**
 * Created by fqg05007 on 2021/8/29.
 */
public class controller {
    private  static final String allIndexAction="/getAllIndex";
    private  static final String searchAction="/search";
    private  static final String pageSearchAction="/pageSearch";
    private  static final String findAllValues="/findAll";
    public static void main(String[] arg){
        HttpUtil.createServer(Integer.valueOf(ConfigUtils.webPort()))
                .setRoot(ConfigUtils.webRoot())
                .addAction(allIndexAction,new GetAllIndexAction())
                .addAction(searchAction,new SearchAction())
                .addAction(findAllValues,new FindAllAction())
                .addAction(pageSearchAction,new PageSearchAction())
                .start();
    }


}
